import request from '@/utils/request'

// 登录
export function login(data) {
  return request({
    url: '/sso/login',
    method: 'post',
    params: data
  })
}
// 修改密码
export function updatePassword(data) {
  return request({
    url: '/sysAuthority/saveSysUser',
    method: 'post',
    data
  })
}

// 系统权限用户列表
export function sysUserList(params) {
  return request({
    url: '/sysAuthority/sysUserList',
    method: 'get',
    params,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

// 新增(修改 - 删除 - 修改权限)系统权限用户
export function submitSysUser(sysUser) {
  return request({
    url: '/sysAuthority/saveSysUser',
    method: 'post',
    data: sysUser,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
